package com.lm56.web.sys.domain;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.Date;

/**
 * Created by Kelvin Yeung on 2016/10/20.
 */

public class User {

    public static final int USER_TYPE_COMPANY =1;
    public static final int USER_TYPE_SENDER =2;
    public static final int USER_TYPE_RECEIVER =3;
    public static final int USER_TYPE_DRIVER =4;
    public static final int USER_TYPE_OTHER =5;

    private long id;
    private String password;
    private String  salt;
    private Date registerDate;
    private String phoneNo;
    private String email;
    private int userType; //1.company;2.sender;3.receiver;4.driver;5.other
    private String userName;
    private String firstLetterOfName;
    private String userAddr;



    public User() {
        super();
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getFirstLetterOfName() {
        return firstLetterOfName;
    }

    public void setFirstLetterOfName(String firstLetterOfName) {
        this.firstLetterOfName = firstLetterOfName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Date getRegisterDate() {
        return registerDate;
    }

    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }


    public String getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getUserType() {
        return userType;
    }

    public void setUserType(int userType) {
        this.userType = userType;
    }



    public String getUserAddr() {
        return userAddr;
    }

    public void setUserAddr(String userAddr) {
        this.userAddr = userAddr;
    }


    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    @Override
    public String toString(){

       return ToStringBuilder.reflectionToString(this);
    }
}
